#include "SDL.h"
#include "SDL_image.h"
#include <cstdio>
#include <cstring>
#include <algorithm>

#ifndef __label_h__
#define __label_h__

namespace labels{
	
	//this converts a c-style string to SDL_Surface
	class generator{
		private:
			short padding; //space beetween letters
			short space; //space length
			SDL_Surface* lower_case[24]; //letter shapes
			SDL_Surface* upper_case[24];
			SDL_Surface* digits[10];
			//returns surface of given character 
			SDL_Surface* get_char_surface(char);
		public:
			//constructor (padding, space, path)
			generator(short, short, const char*);
			//draws label onto desired screen
			void draw(const char*, short, short, SDL_Surface*);
			//calculates dimensions of specified label 
			short get_width(const char*);
			short get_height(const char*);
			//destructor
			~generator();
	};

	class label{
		protected:
			char caption[255]; //label caption
			generator *gen; 
		public:
			label(const char*, generator*);
			//draws label onto desired surface at specified coordinates
			void draw(SDL_Surface*, short, short);
			//sets label caption
			void set_caption(const char*);
			//sets label ganarator
			void set_generator(generator*);
			//calculates dimensions
			short get_width();
			short get_height();
	};
}
#endif
